/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pe.com.cotelasa.scp.dominio.servicio.impl;

import java.io.Serializable;
import java.util.Collection;
import javax.inject.Inject;
import org.springframework.stereotype.Service;
import pe.com.cotelasa.common.dao.excepcion.DAOException;
import pe.com.cotelasa.scp.dao.IDAOPais;
import pe.com.cotelasa.scp.dominio.excepcion.ServiceException;
import pe.com.cotelasa.scp.dominio.service.IServicioPais;
import pe.com.cotelasa.scp.entidad.Pais;

/**
 *
 * @author Esparza
 */
@Service
public class ServicioPaisImpl implements IServicioPais, Serializable  {

    @Inject
    private IDAOPais daoPais;
    
    @Override
    public Collection<Pais> listarPaisesActivos() throws ServiceException {
        try {
            return daoPais.listarActivos(Pais.class);
        } catch (DAOException ex) {
            throw new ServiceException(ex.getMessage(), ex);
        }
    }
    
}
